<template>
	<view class='wrapper'>
		<view @touchmove="welMove" v-if="welcome" class="welcome">
			<view class="welBox">
				<view class="welTitle">每日福利</view>
				<view class="welTxt">
					<view>系统每天将会赠送3朵玫瑰</view>
					<view @tap="getHua">记得明天再来哦 <text>>>玫瑰用途</text></view>
				</view>
				<view @tap="offWel" class="welBtn">我知道啦</view>
			</view>
		</view>
		<view v-show="publics" class="public">
			<public-act @bindAct="bindAct"></public-act>
		</view>
		<view v-show="tabPage=='home'" :class="[homeShow?'homes show':'homes hide']"><!-- //首页 -->
			<home
			:homeData="homeData"
			:loadTxt="home_loadTxt" 
			:loading="home_loading" 
			:actList="actList"
			@scrolltoupper="home_scrolltoupper"
			@homeTolower="homeTolower" 
			@bindActivity="bindActivity" 
			@bindswiper="bindswiper"
			@bindNav="bindNav"
			></home>
		</view>
		<!-- 缘分 -->
		<view v-show="tabPage=='luck'" :class="[luckShow?'luck show':'luck hide']">
			<luck
			:luckList="luckList" 
			:loading="luck_loading" 
			:loadTxt="luck_loadTxt"
			:tab="luckTab"
			:freeStyle="freeStyle"
			
			@bindUser="bindUser"
			@scrolltoupper="luck_scrolltoupper"
			@bindluckTab="bindluckTab" 
			@lucktolower="lucktolower" 
			></luck>
		</view>
		<view v-show="tabPage=='community'" :class="[communityShow?'community show':'community hide']">
			<community 
			@scrolltoupper="com_scrolltoupper"
			@comTolower="comTolower" 
			@bindCommunity="bindCommunity" 
			@lookBig="lookBig"
			@bindFlower="bindFlower"
			@bindcomUser="bindcomUser"
			@bindAdd="bindAdd"
			:loadTxt="loadTxt" 
			:loading="loading" 
			:comList="comList"
			></community>
		</view>
		<view v-show="tabPage=='mycenter'" :class="[mycenterShow?'center show':'center hide']">
			<mycenter
			:myinfo="myinfo"
			:navList="navList"
			:lookinfo="lookinfo"
			@selectInfo="selectInfo"
			@bindHead="bindHead"
			@bindHeadlook="bindHeadlook"
			@lookMy="lookMy"
			@offInfo="offInfo"
			
			@bindSetup="bindSetup"
			@bindVip="bindVip"
			@bindHua="bindHua"
			@bindFen="bindFen"
			@bindMoney="bindMoney"
			@bindNav="bindmyNav"
			></mycenter>
		</view>
		<!-- 底部导航菜单 -->
		 <view class='footer'>
			<view class='tabCont flex_row'>
			  <view @tap='ontabBar(index,item.page)' class='tab btnActive' v-for="(item,index) in tabList" :key="index" :data-id="index" :data-page="item.page">
				<form @submit="formSubmit" report-submit="true">
				  <button hover-class='none' formType="submit">
						<image v-if="tabId==index" :src='item.imgon'></image>
						<image v-else :src='item.img'></image>
						<view :class="[tabId==index?'text active':'text']">{{item.tabTxt}}</view>
						<!-- <view v-if="item.page=='message'&&chat_num!=0" class='pot'>{{chat_num}}</view> -->
						<view v-if="item.page=='mycenter'&&face_num!=0" class='pot cent flex_col'>
							<text v-if="face_num>99">99+</text>
							<text v-else>{{face_num}}</text>
						</view>
				  </button>
				</form>
			  </view>
			</view>
		 </view>
	</view>
</template>
<script>
	import common from "../../common/network.js";
	import home from "../../components/home.vue";
	import luck from "../../components/luck.vue";//缘分界面
	import community from "../../components/community.vue";//社区界面
	import mycenter from "../../components/mycenter.vue";//我的界面
	import publicAct from "../../components/publicAct.vue";//发布邀约
	let pageList=[],_page = 'home',lon='',lat='',session='';
	var home_page=1,home_fullpage=1;
	var luck_order=1,luck_page=1,luck_fullpage=1;
	var com_page = 1,com_fullpage=1;//社区分页
	var com_index = -1;
	var home_index = -1;
	export default {
		components:{home,luck,community,mycenter,publicAct},
		data() {
			return{
				welcome:false,sharemsg:'',
				windowH:0,publics:false,
				tabList: [
					{
					'imgon': '../../static/image/foot1.png',
					'tabTxt': '首页',
					'img': '../../static/image/foot1.png',
					'page': 'home'
					},
					{
					'imgon': '../../static/image/foot2.png',
					'tabTxt': '缘分',
					'img': '../../static/image/foot2.png',
					'page': 'luck'
					},
					{
					'imgon': '../../static/image/foot3.png',
					'tabTxt': '',
					'img': '../../static/image/foot3.png',
					'page': 'public'
					},
					{
					'imgon': '../../static/image/foot4.png',
					'tabTxt': '社区',
					'img': '../../static/image/foot4.png',
					'page': 'community'
					},
					{
					'imgon': '../../static/image/foot5.png',
					'tabTxt': '我的',
					'img': '../../static/image/foot5.png',
					'page': 'mycenter'
					},
				],
				tabId: 0,chat_num:0,face_num:0,
				tabPage:'home',homeShow:true,luckShow:false,communityShow:false,mycenterShow:false,
				
				homeData:'',actList:[],home_loading:false,home_loadTxt:'正在加载...',
				
				luckList:[],luckTab:0,luck_loading:false,luck_loadTxt:'正在加载...',freeStyle:'',
				comList:[],loading:false,loadTxt:'正在加载...',
				myinfo:'',lookinfo:false,changeImg:false,upimg:1,
				navList:[
					{
						'img':'../../static/image/my4.png',
						'txt':'我的资料',
						'page':'/pagesA/msgEdit/msgEdit'
					},
					{
						'img':'../../static/image/my5.png',
						'txt':'我的账户',
						'page':'/pagesA/myMoney/myMoney',
						'pot':true,
						'potType':'',
					},
					{
						'img':'../../static/image/my6.png',
						'txt':'消息通知',
						'potNum':true,
						'page':'/pagesA/message/message',
						'potType':'',
					},
					{
						'img':'../../static/image/my7.png',
						'txt':'社区互动',
						'page':'/pagesA/comment/comment',
						'potNum':true,
						'potType':'',
					},
					{
						'img':'../../static/image/my8.png',
						'txt':'最近访客',
						'people':true,
						'page':'/pagesA/lookMe/lookMe',
						'peopleList':[],
					},
					{
						'img':'../../static/image/my9.png',
						'txt':'喜欢的人',
						'pot':true,
						'page':'/pagesA/likes/likes',
						'potType':'',
					},
					{
						'img':'../../static/image/my10.png',
						'txt':'礼物记录',
						'page':'/pagesA/giftRecord/giftRecord',
						'pot':true,
						'potType':'',
					},
					{
						'img':'../../static/image/my11.png',
						'page':'/pagesA/strategy/strategy',
						'txt':'赚钱攻略',
						'pot':true,
						'potType':'',
					},
					{
						'img':'../../static/image/my13.png',
						'page':'/pagesA/agreement/agreement',
						'txt':'用户须知',
					},
				],
				
			}
		},
		watch:{
			
		},
		onLoad:function(){
			var that = this;
			home_page=1,luck_page=1,com_page = 1,com_index = -1,home_index = -1;
			uni.getStorage({
				key:'userinfo',
				success:function(res){
					session = res.data.session;
					uni.getLocation({
						success:function(res){
							lon = res.longitude;
							lat = res.latitude;
						}
					})
					that.homeTop_data();
				},
// 				fail:function(){// 打包APP用************
// 					session = "1540451138359";
// 					uni.getLocation({
// 						success:function(res){
// 							lon = res.longitude;
// 							lat = res.latitude;
// 						}
// 					})
// 					that.homeTop_data();
// 				}// 打包APP用************
			})
		},
		onPullDownRefresh:function(){
			
		},
		onShow:function(){
			var that = this;
			if(that.homeData!=''){
				that.noready();
			}
			this.publics = false;
			if(_page=="home" && this.actList!=''){
				if(home_index==-2){
					uni.getStorage({
						key: 'addAct',
						success:function(res){
							var arr = that.actList;
							arr.unshift(res.data);
							that.actList = arr;
						}
					})
				}
				if(home_index>=0){
					uni.getStorage({
						key: 'delAct',
						success:function(){
							var arr = that.actList;
							arr.splice(home_index,1);
							that.actList = arr;
						}
					})
				}
				// home_page = 1;
				// this.homeBtm_data('shows');
				// console.log('首页');
			}
			if(_page=="luck"){
				// luck_page = 1;
				// this.luck_data('shows');
				// console.log('缘分');
			}
			if(_page=="community"){
				console.log('社区')
				console.log('com_index:'+com_index)
				var that = this;
				if(com_index==-2){
					uni.getStorage({
						key: 'trendList',
						success:function(res){
							console.log(res.data)
							var arr = that.comList;
							arr.unshift(res.data);
							that.comList = arr;
						}
					})
				}
				if(com_index>=0){
					console.log('com_index:'+com_index)
					uni.getStorage({
						key:'commentNum',
						success:function(res){
							console.log(res)
							that.comList[com_index].last_ceng.ping_num = res.data.ping;
							that.comList[com_index].last_ceng.flower_num = res.data.hua;
							uni.getStorage({
								key: 'delList',
								success:function(res){
									var arr = that.comList;
									arr.splice(com_index,1);
									that.comList = arr;
								},
							})
						},
						fail:function(err){
							console.log(err)
						}
					})
				}
				// com_page = 1;
				// this.com_data('shows');
				// console.log('社区')
			}
			if(_page=="mycenter"&&this.upimg==1){
				console.log('我的')
				this.my_data();
			}
		},
		onShareAppMessage:function(){
			var sharemsg = this.sharemsg;
			return {
			   title: sharemsg.c_title,
			   path: '/pages/index/index',
			   imageUrl: sharemsg.c_img
			}
		},
		methods:{
			getshareImg:function(){
				var that = this;
				var $data = {
					'type':'zshare_share_qian',
					'session':session,
					'c_type':0,
				};
				common.network.request($data,function(res){
					that.sharemsg = res;
				})
			},
			getHua:function(){
				uni.navigateTo({
					url:"/pagesA/getHua/getHua?session="+session,
					success:function(){
						this.welcome = false;
					}
				})
			},
			offWel:function(){
				this.welcome = false;
			},
			welMove:function(){
				return false;
			},
			bindAct:function(str){//发布约会选择
				var that = this;
				that.publics = false;
				if(str=="不约了"){
					
				}else{
					uni.navigateTo({
						url:"/pages/public/public?title="+str+"&session="+session,
						success:function(){
							that.publics = false;
							_page = pageList[0];
							if(pageList.length == 1 || pageList[0] == "public"){
								_page = "home";
							}
						}
					})
				}
			},
			ontabBar:function(index,pagetype){
				var that = this;
				console.log(pagetype);
				_page = pagetype;
				that.lookinfo = false;
				Array.prototype.unique3 = function() { //数组去重；
					var res = [];
					var json = {};
					for (var i = 0; i < this.length; i++) {
						if (!json[this[i]]) {
							res.push(this[i]);
							json[this[i]] = 1;
						}
					}
					return res;
				}
				pageList.push(pagetype);
				var len = pageList.length;
				pageList = pageList.unique3();
				pageList = pageList.slice(len-2,len);
				if(pagetype=="public"){//发布
					home_index = -2;
					this.publics = true;
					return false;
				}else{
					this.noready();
					this.publics = false;
					this.tabId = index;//footer高亮字体
					this.tabPage = pagetype;//页面显示
					if(pagetype=="home"){//首页
						this.homeShow = true;
						if(this.actList==''){
							home_page = 1;
							this.homeBtm_data();
						}
					}
					if(pagetype=="luck"){//缘分
						this.luckShow = true;
						if(this.luckList==''){
							luck_page = 1;
							luck_order = 1;
							this.luck_data();
						}
					}
					if(pagetype=="community"){//社区
						this.communityShow = true;
						if(this.comList==''){
							com_page = 1;
							this.com_data();
						}
					}
					if(pagetype=="mycenter"){//我的
						this.mycenterShow = true;
						this.my_data();
					}
				}
			},
			//获取消息未读数量
			noready:function(){
				var that = this;
				var $data = {
					'type':'zmsg_msg_num',
					'session':session,
				};
				common.network.request($data,function(res){
					console.log(res);
					that.getshareImg();
					that.face_num = res.msg_num;
				})
			},
			//首页
			homeTop_data:function(){
				var that = this;
				var $data = {
					'type':'zac_app_index',
					'session':session,
					'lon':lon,
					'lat':lat
				};
				common.network.request($data,function(res){
					console.log(res);
					that.homeData = res;
					uni.setStorage({//隐藏距离
						key:'free_style',
						data:res.free_style
					})
					that.freeStyle = res.free_style;
					that.noready();
					if(res.is_tan_flower==1){
						that.welcome = true;
					}else{
						that.welcome = false;
					}
					that.homeBtm_data();
				})
			},
			bindswiper:function(id){
				console.log(id)
				if(id==1){
					uni.navigateTo({
						url: '/pagesA/strategy/strategy?session='+session
					})
				}else if(id==4){
					uni.navigateTo({
						url: '/pagesA/myMoney/myMoney?session='+session
					})
				}else if(id==3){
					uni.navigateTo({
						url: '/pagesA/msgEdit/msgEdit?session='+session
						
					})
				}
			},
			bindNav:function(e){
				var str = e.f_name;
				var id = e.id;
				uni.navigateTo({
					url:'/pagesA/actClassify/actClassify?title='+str+'&session='+session+'&cid='+id,
				})
			},
			bindActivity:function(index,id){
				home_index = index;
				uni.navigateTo({
					url:'/pagesA/actDetail/actDetail?session='+session+'&actid='+id
				})
			},
			homeBtm_data:function(shows){
				var that = this;
				var $data = {
					'type':'zac_ac_list',
					'session':session,
					'page':home_page
				};
				common.network.request($data,function(res){
					console.log(res);
					home_fullpage = res.pageData.pagecount;
					home_index = -1;
					uni.removeStorage({
						key: 'delAct'
					})
					uni.removeStorage({
						key: 'addAct'
					})
					if(shows){
						that.actList = res.list;
						
					}else{
						that.actList = (that.actList).concat(res.list);
					}
					that.home_loading = false;
// 					setTimeout(function(){
// 						uni.stopPullDownRefresh();
// 					},1000)
				})
			},
			home_scrolltoupper:function(){
				home_page = 1;
				var that = this;
				uni.showLoading({
					title:'刷新中...'
				})
				setTimeout(function(){
					uni.hideLoading();
				},1000)
				that.homeBtm_data('shows');
// 				uni.startPullDownRefresh({
// 					success:function(){
// 						console.log('首页刷新');
// 						that.homeBtm_data('shows');
// 					}
// 				})
			},
			homeTolower:function(){
				console.log('到底了')
				this.home_loading = true;
				if(home_page>=home_fullpage){
					this.home_loadTxt = "我是有底线的";
					return false;
				}else{
					this.home_loadTxt = "正在加载...";
					home_page ++;
					this.homeBtm_data();
				}
			},
			//缘分
			bindUser:function(id){
				uni.navigateTo({
					url: "/pagesA/userInfo/userInfo?userid="+id+"&session="+session
				})
			},
			bindluckTab:function(index){
				this.luckTab = index;
				luck_order = (index+1);
				luck_page = 1;
				this.luck_loading= false;
				// this.luckList = [];
				this.luck_data('shows');
			},
			luck_data:function(shows){
				var that = this;
				var list = that.luckList;
				var $data = {
					'type':'zedge_index',
					'order_style':luck_order,
					'session':session,
					'page':luck_page
				};
				common.network.request($data,function(res){
					console.log(res)
					luck_fullpage = res.pageData.pagecount;
					if(shows){
						that.luckList = res.list;
					}else{
						that.luckList = list.concat(res.list);
					}
					that.luck_loading = false;
// 					setTimeout(function(){
// 						uni.stopPullDownRefresh();
// 					},1000)
				})
			},
			luck_scrolltoupper:function(){
				luck_page = 1;
				var that = this;
				uni.showLoading({
					title:'刷新中...'
				})
				setTimeout(function(){
					uni.hideLoading();
				},1000)
				that.luck_data('shows');
// 				uni.startPullDownRefresh({
// 					success:function(){
// 						that.luck_data('shows');
// 						console.log('缘分刷新');
// 					}
// 				})
			},
			lucktolower:function(){
				console.log('到底了');
				this.luck_loading = true;
				if(luck_page>=luck_fullpage){
					this.luck_loadTxt = "我是有底线的";
					return false;
				}else{
					this.luck_loadTxt = "正在加载...";
					luck_page ++;
					this.luck_data();
				}
			},
			//社区
			com_data:function(shows){
				var that = this;
				var $data = {
					'type':'zcommunity_com_list',
					'session':session,
					'page':com_page,
					'lon':lon,
					'lat':lat
				};
				common.network.request($data,function(res){
					com_fullpage = res.pageData.pagecount;
					console.log(res);
					com_index = -1;
					uni.removeStorage({
						key: 'delList'
					})
					uni.removeStorage({
						key: 'trendList'
					})
					uni.removeStorage({
						key:'commentNum'
					})
					if(shows){
						that.comList = res.list;
					}else{
						that.comList = (that.comList).concat(res.list);
					}
					that.loading = false;
// 					setTimeout(function(){
// 						uni.stopPullDownRefresh();
// 					},1000)
				})
			},
			bindAdd:function(){
				uni.navigateTo({
					url:'/pagesA/sendTrends/sendTrends?session='+session,
					success:function(){
						com_index = -2;
					}
				})
			},
			bindFlower:function(index,communityId){
				var that = this;
				var $data = {
					'type':'zcommunity_ins_flower',
					'session':session,
					'c_id':communityId,
				};
				uni.showModal({
					content:"送TA一朵花",
					confirmColor:'#6278FF',
					confirmText:'赠送',
					success:function(res){
						if(res.confirm){
							common.network.request($data,function(res){
								that.comList[index].last_ceng.flower_num = parseInt(parseInt(that.comList[index].last_ceng.flower_num)+1);
							})	
						}
					}
				})
			},
			bindcomUser:function(id){
				uni.navigateTo({
					url: "/pagesA/userInfo/userInfo?session="+session+"&userid="+id
				})
			},
			lookBig:function(c_index,id,index,item){
				var arr = [],that = this;
				com_index = -1;
				for (var i = 0; i < item.length; i++) {
					arr.push(item[i].c_img)
				}
				com_index = c_index;
				that.comList[com_index].last_ceng.see_num = parseInt(parseInt(that.comList[com_index].last_ceng.see_num)+1);
				uni.previewImage({
					current: item[index].c_img,
					urls:arr,
					complete:function(){
						that.getDetail(id);
					}
				})
			},
			getDetail:function(id){
				var that = this;
				var $data = {
					'type':'zcommunity_one_item',
					'session':session,
					'c_id':id,
					'see_add':1
				};
				common.network.request($data,function(res){})
			},
			bindCommunity:function(index,id){
				var that = this;
				com_index = index;
				uni.navigateTo({
					url:'/pagesA/trendsDetail/trendsDetail?communityId='+id+'&session='+session,
					success:function(){
						that.comList[index].last_ceng.see_num = parseInt(parseInt(that.comList[index].last_ceng.see_num)+1);
					}
				})
			},
			comTolower:function(){
				console.log('到底了');
				this.loading = true;
				if(com_page>=com_fullpage){
					this.loadTxt = "我是有底线的";
					return false;
				}else{
					this.loadTxt = "正在加载...";
					com_page ++;
					this.com_data();
				}
			},
			com_scrolltoupper:function(){
				com_page = 1;
				var that = this;
				uni.showLoading({
					title:'刷新中...'
				})
				setTimeout(function(){
					uni.hideLoading();
				},1000)
				that.com_data('shows');
// 				uni.startPullDownRefresh({
// 					success:function(){
// 						that.com_data('shows');
// 						console.log('社区刷新')
// 					}
// 				})
			},
			//我的
			my_data:function(shows){
				var that = this;
				var $data = {
					'type':'zinfo_index',
					'session':session,
				};
				this.upimg = 1;
				common.network.request($data,function(res){
					console.log(res);
					var usermsg = res.user_arr;
					that.myinfo = res;
					if(that.myinfo.user_arr.is_change_photo==0&&!that.changeImg){
						uni.showModal({
							content: '您头像不清晰，为了更好的寻觅知己玩伴,请及时上传本人高清头像',
							confirmColor:'#6673FF',
							confirmText:'上传头像',
							success:function(res){
								if(res.confirm){
									that.headPic();
								}
							}
						})
					}
					(that.navList)[1].potType = usermsg.my_money_no_read;
					(that.navList)[2].potType = res.msg_num;
					
					(that.navList)[3].potType = usermsg.shequ_no_read;
					(that.navList)[4].peopleList = res.three_see;
					(that.navList)[5].potType = usermsg.like_no_read;
					(that.navList)[6].potType = usermsg.gift_no_read;
					(that.navList)[7].potType = usermsg.get_money_no_read;
					setTimeout(function(){
						uni.hideLoading();
					},1000)
				})
			},
			selectInfo:function(){
				this.lookinfo = true;
			},
			offInfo:function(){
				this.lookinfo = false;
			},
			lookMy:function(id){
				var that = this;
				uni.navigateTo({
					url: "/pagesA/userInfo/userInfo?session="+session+"&userid="+id,
					success:function(){
						that.lookinfo = false;
					}
				})
			},
			bindHead:function(){//更换头像
				this.upimg = 0;
				this.headPic();
			},
			bindHeadlook:function(){//预览头像
				var that = this;
				that.lookinfo = false;
				var myinfo = that.myinfo;
				uni.previewImage({
					urls: [myinfo.user_arr.avatarurl]
				})
			},
			headPic:function(){
				var that = this;
				that.lookinfo = false;
				uni.chooseImage({
					count:1,
					sizeType:['compressed'],
					success:function(res){
						var arr = res.tempFilePaths;
						that.changeImg = true;
						// that.myinfo.user_arr.avatarurl = arr[0];
						uni.showLoading({
							title:'正在上传'
						})
						wx.uploadFile({
							url: 'https://yp.6vx.com/?m=Jke',
							filePath: arr[0],
							name: 'file',
							formData:{
								'type':'zupload_upload_img',
								'session':session
							},
							success:function(res){
								var stc = JSON.parse(res.data);
								var addsrc = stc.data;
								
								var $data = {
									'type':'zupinfo_up_head_phone',
									'session':session,
									'avatarurl':addsrc,
								};
								common.network.request($data,function(res){
									
									that.my_data();
									common.network.getStorage('userinfo',function(data){
										var mydata = data;
										data.avatarurl = addsrc;
										common.network.setStorage('userinfo',data,function(){})
									})
									console.log(res);
								})
							},
						})
					}
				})
			},
			//跳转界面
			bindSetup:function(){
				uni.navigateTo({
					url:"/pagesA/setUp/setUp?session="+session
				})
			},
			bindVip:function(){
				uni.navigateTo({
					url:"/pagesA/vip/vip?session="+session
				})
			},
			bindHua:function(){
				uni.navigateTo({
					url:"/pagesA/getHua/getHua?session="+session
				})
			},
			bindFen:function(){
				uni.showModal({
					content:"颜值分是其他用户给你打分的平均值，完善资料，上传个人照到相册，才能吸引到用户给你打高分",
					confirmColor:'#6278FF',
					showCancel:false,
				})
			},
			bindMoney:function(){
				uni.navigateTo({
					url:"/pagesA/myMoney/myMoney?session="+session
				})
			},
			bindmyNav:function(_page){
				uni.navigateTo({
					url:_page+'?session='+session,
				})
			},
			//获取formId发送模板消息
			formSubmit:function(e){
				console.log(e.detail.formId);
				if (e.detail.formId == 'the formId is a mock one' || session==''){
					return false;
				}else{
					var $data = {
						'type': 'zinfo_get_fromid',
						'session': session,
						'formid': e.detail.formId,
					};
					common.network.request($data, function (res) {
						console.log(res);
					})
				}
			}
		}
	}
</script>
<style scoped="scoped">
	.wrapper{
		/* padding-bottom: 110px; */
		font-family: "黑体";
	}
	.welcome{
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 100;
		background: rgba(0,0,0,0.6);
	}
	.welBox{
		background: linear-gradient(to right bottom,#B326EE,#4C1BD6);
		color: #fff;
		width: 70%;
		border-radius: 14px;
		position: absolute;
		top: 30%;
		left: 15%;
		padding: 30px;
		box-sizing: border-box;
		text-align: center;
	}
	.welTitle{
		font-size: 34px;
		padding-bottom: 30px;
	}
	.welTxt{
		line-height: 50px;
		font-size: 28px;
		padding: 20px;
		background: rgba(0,0,0,0.4);
		border-radius: 8px;
		text-align: center;
	}
	.welTxt text{
		color: #00E69D;
		margin-left: 40px;
	}
	.welBtn{
		color: #4F18A9;
		font-size: 28px;
		display: inline-block;
		padding: 12px 24px;
		background: #FCE547;
		border-radius: 4px;
		margin-top: 30px;
	}
	.public{
		background: rgba(0,0,0,0.6);
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 2;
	}
	/* 底部导航 */
	.footer{
	   /* border-top: 1px solid #f1f1f1; */
	  box-shadow: 0 -1px 1px rgba(220,220,220,0.4);
	  position: fixed;
	  width: 100%;
	  bottom: 0;
	  left: 0;
		z-index: 90;
		
	}
	.tabCont,.footer button{
	  background: #fff;
	  color: #AEACAC;
	  font-size: 26px;
	  height: 110px;
	  box-sizing: border-box;
		
	}
	.tabCont{
	  display: flex;
	  flex-direction: row;
	  justify-content: space-between;
	}
	.tab{
	  width: 20%;
	  height: 100%;
	  text-align: center;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  justify-content: center;
	  transition: all 0.4s;
	  position: relative;
		background: #fff;
		
	}
	.tabCont .tab:nth-of-type(3){
		top: -30px;
		background: transparent;
		box-sizing: border-box;
		/* padding-top: 40px; */
		/* height: 176px; */
		box-sizing: border-box;
	}
	.tabCont .tab:nth-of-type(3) button{
		/* background: transparent; */
		width: 100px;
		height: 100px;
		border-radius: 50%;
		padding: 0;
		box-shadow: 0 10px 20px rgba(10,10,10,0.1);
	}
	form{
	  width: 100%;
	  height: 100%;
	}
	.tab button{
	  width: 100%;
	  height: 100%;
	  position: relative;
	  line-height: 1.70;
	  display: flex;
	  flex-direction: column;
	  align-items: center;
	  justify-content: center;
	  border-radius: 0;
	}
	.tab button::after{
	  border: none;
	}
	.tab .active{
	  color: #6278FF;
	  transition: all 0.4s;
	}
	.pot{
	  background: #FF3C30;
	  color: #fff;
	  font-size: 22px;
		min-width: 36px;
	  height: 36px;
	  border-radius: 50%;
	  text-align: center;
		justify-content: center;
	  position: absolute;
	  top: 2px;
	  right: 32px;
	}
	.tab image{
	  width: 46px;
	  height: 46px;
	  opacity: 0.9;
	}
	.tabCont .tab:nth-of-type(3) image{
	  width: 100px;
	  height: 100px;
	}
	.homes.show{
	  animation: findshow 0.4s linear forwards;
	}
	@keyframes findshow{
	  0%{opacity: 0;}
	  100%{opacity: 1;}
	}
	.homes.hide{
	  animation: findhide 0.4s linear forwards;
	}
	@keyframes findhide{
	  0%{opacity: 1;}
	  100%{opacity: 0;}
	}
	.luck.show{
	  animation: nearshow 0.4s linear forwards;
	}
	@keyframes nearshow{
	  0%{opacity: 0;}
	  100%{opacity: 1;}
	}
	.luck.hide{
	  animation: nearhide 0.4s linear forwards;
	}
	@keyframes nearhide{
	  0%{opacity: 1;}
	  100%{opacity: 0;}
	}
	.community.show{
	  animation: msgshow 0.4s linear forwards;
	}
	@keyframes msgshow{
	  0%{opacity: 0;}
	  100%{opacity: 1;}
	}
	.community.hide{
	  animation: msghide 0.4s linear forwards;
	}
	@keyframes msghide{
	  0%{opacity: 1;}
	  100%{opacity: 0;}
	}
	.center.show{
	  animation: centershow 0.4s linear forwards;
	}
	@keyframes centershow{
	  0%{opacity: 0;}
	  100%{opacity: 1;}
	}
	.center.hide{
	  animation: centerhide 0.4s linear forwards;
	}
	@keyframes centerhide{
	  0%{opacity: 1;}
	  100%{opacity: 0;}
	}

</style>
